<!--#include file="lib/utf-8.asp"-->
<!--#include file="lib/conn.asp"-->
<%
call CheckRights(3,4)
%>
<%
If (Request.QueryString("yjid") <> "") Then
  yjid = Request.QueryString("yjid")
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="lib/sheet.css" type="text/css">
<title>无标题文档</title>
</head>
<%

if request.form("mm_edit")<>"" then
	if request.Form("area")<>"" then area=request.Form("area")
	if request.Form("dd")<>"" then dd=request.Form("dd")
	if request.Form("xx")<>"" then xx=request.Form("xx")
	yj=trim(replace(request.form("yj"),"'","''"))
	if yj="" then yj=0
	jsj=trim(replace(request.form("jsj"),"'","''"))
	if jsj="" then jsj=0
	zdrlf=trim(replace(request.form("zdrlf"),"'","''"))
	if zdrlf="" then zdrlf=0
	zdglf=trim(replace(request.form("zdglf"),"'","''"))
	if zdglf="" then zdglf=0
	chanzhi=trim(replace(request.form("chanzhi"),"'","''"))
	if chanzhi="" then chanzhi=0
	set cmd=Server.CreateObject("ADODB.Command")
	cmd.ActiveConnection = conn
	sql="update yj set area='"&area&"',didian='"&dd&"',xiangxing='"&xx&"',yunjia="&yj&",jsj="&jsj&",zdrlf="&zdrlf&",zdglf="&zdglf&",chanzhi="&chanzhi&" where yjid="&yjid
	response.Write(sql)
	cmd.CommandText = sql
	cmd.Execute
	view_url="manage_yj.asp"
	response.Redirect(view_url)
end if



yjid=request.QueryString("yjid")
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.ActiveConnection = conn
	rs.CursorType = 1
	rs.CursorLocation = 2
	rs.LockType = 3
	rs.Source = "SELECT * FROM yj WHERE yjid = " + Replace(yjid, "'", "''") + ""
	rs.Open()

%>

<body>
<div class="navbar">
	<a href="manage_yj.asp">运价信息管理</a>&gt;&gt;<a href="edit_yj.asp?yjid=<%=yjid%>">编辑运价</a>&gt;&gt;
</div>

<form name="form1" method="post" action="edit_yj.asp?yjid=<%=yjid%>">
<table cellspacing="1" cellpadding="2" border="0" bgcolor="black" width="100%">
    <tr bgcolor="silver">
		<th>ID</th>
		<th>区域</th>
		<th>地点</th>
		<th>箱型</th>
		<th>应收运价</th>
		<th>应付运价</th>
		<th>指导燃料费</th>
		<th>指导过路费</th>
		<th>产值</th>
    </tr>
    <tr bgcolor="#efefef" align="center">
      <td><%=rs("yjid")%></td>
		<td><input name="area" type="text" value=<%=rs("area")%>></td>
		<td><input name="dd" type="text" value=<%=rs("didian")%> readonly="readonly"></td>
		<td>
		<select name="xx">
        <option value="40" <%If rs("xiangxing")=40 Then response.write("selected")%>>40</option>
        <option value="20" <%If rs("xiangxing")=20 Then response.write("selected")%>>20</option>
        <option value="45" <%If rs("xiangxing")=45 Then response.write("selected")%>>45</option>
		</select>
		</td>
		<td><input name="yj" type="text" value=<%=rs("yunjia")%>></td>
		<td><input name="jsj" type="text" value=<%=rs("jsj")%>></td>
		<td><input name="zdrlf" type="text" value=<%=rs("zdrlf")%>></td>
		<td><input name="zdglf" type="text" value=<%=rs("zdglf")%>></td>
		<td><input name="chanzhi" type="text" value=<%=rs("chanzhi")%>></td>
    </tr>
    <tr bgcolor="silver">
      <td colspan="9"><div align="center">
        <input type="submit" name="Submit" value="提交">
        &nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="Reset" value="重置">
        <input type="hidden" name="mm_edit" value="true">
      </div></td>
    </tr>
  </table>
</form>
</body>
</html>
<%
rs.Close()
Set rs = Nothing
%>
